/*
 * @: 
 * @version: 1.0
 * @Author: ziwei
 * @Date: 2021-11-02 00:30:24
 * @LastEditors: ziwei
 * @LastEditTime: 2021-11-02 16:35:49
 */
import {createStore,applyMiddleware} from 'redux'
import reducer from './reducer'
import createSagaMiddleware from '../redux-saga'
import rootSaga from './sagas';//根saga

let sagaMiddleware = createSagaMiddleware()
let store = applyMiddleware(sagaMiddleware)(createStore)(reducer);
sagaMiddleware.run(rootSaga);// 负责一步步执行完毕
export default store

window.store = store